@import '../global.less';

.layout {
  position: relative;
}

.layout-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  display: flex;
  height: 80px;
  line-height: 80px;
  background-color: @header-color;
  align-items: center;

  .logo {
    width: 400px;
    padding: 10px 0;
    line-height: 20px;
    font-weight: 600;
    font-size: 26px;
    text-align: center;
    cursor: pointer;

    a {
      color: #353535;
    }

    img {
      height: 60px;
      margin-right: 5px;
      vertical-align: middle;
    }

    span {
      vertical-align: middle;
    }
  }

  .header-inner {
    color: @bread-separator-color;
    flex: 1;
  }

  .user-info {
    float: right;
    display: flex;
    padding-right: 10px;
    align-items: center;
  }

  .remind {
    padding: 0 15px;
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
  }

  .i-remind {
    position: relative;
    font-size: 22px;
    color: @bread-separator-color;
    cursor: pointer;   
    span {
      position: absolute;
      top: -3px;
      left: 12px;
      display: block;
      width: 10px;
      height: 10px;
      color: #fff;
      text-align: center;
      font-size: 12px;
      background-color: @danger-color;
      border-radius: @radius*5;
      -webkit-transform: scale(.75);
      transform: scale(.75);
    }

    &.router-link-active {
      color: #fff;
    }
  }

  .info {
    padding-right: 20px;

    .role {
      margin-right: 8px;    
    }
  }

  .logout {
    padding-left: 10px;
    color: @red-color;
    cursor: pointer;
    
    .icon {
      font-size: 25px;
    }
  }
}

.layout-content {
  padding: 96px 0 0 210px;
}

.layout-aside {
  position: fixed;
  top: 100px;
  bottom: 0;
  left: 0;
  z-index: 108;
  width: 210px;
  background-color: @menu-bg-color;
  overflow-y: auto;

  .nav-aside {
    margin: 0;    

    .el-submenu{
      &.is-active, &.is-opened{
        .el-submenu__title{
          color: #1AAD19;
        }
      }
      .el-submenu__title{
        background: #f6f8f9;
        font-size: 18px;
        color: #222222;
        height: 50px;
        line-height: 50px;
      }
      .el-menu-item{
        height: 36px;
        line-height: 36px;
        color: #222;
        &:hover{
          background: rgba(0, 0, 0, 0.03);
        }
        &.is-active{
          background: #f6f8f9;
          color: #1AAD19;
        }
      }
    }
  }
}

.layout-nav {
  left: 210px;
  z-index: 100;
  padding: 15px 25px;
  background-color: @bg-color;
}

.layout-main {
  padding: 20px;
  margin: 0 20px;
  position: relative;
    background: #fff;
}

.layout-system {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  .layout-content {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .sub-layout {
    position: absolute;
    top: 96px;
    bottom: 0;
    left: 210px;
    right: 0;
    background-color: #fff;
  }

  .sub-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px;
    overflow: hidden;
    background-color: @bg-color;
    border-right: 1px solid @border-color;

    .search-bar {
      display: flex;
      height: 35px;
      padding: 10px;
      border-bottom: 1px solid @border-color;
      align-items: center;

      .icon {
        font-size: 16px;
      }

      .add {
        width: 30px;
        height: 30px;
        margin-left: 10px;
        line-height: 30px;
        color: #fff;
        text-align: center;
        background-color: @base-color;
        cursor: pointer;
        border-radius: @radius;

        a {
          color: #fff;
        }
      }

    }

    .search-box {
      position: relative;
      flex: 1;

      .i-search {
        position: absolute;
        top: 8px;
        right: 6px;
      }

      .el-input__inner {
        font-size: 12px;
      }
    }
  }

  .sub-main {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 261px;
    right: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .section-info {
    padding: 15px;
    line-height: 35px;
    border-bottom: 1px solid @border-color;

    .name {
      margin-right: 20px;
      font-weight: 600;
      font-size: 16px;
    }

    .permission {
      margin-left: 10px;
    }
  }

  .side-nav {

    position: absolute;
    top: 56px;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: auto;

  }
}

.dropdown {
  position: relative;
  display: inline-block;

  &:hover {
    .dropdown-menu {
      display: block;
    }
  }

  .dropdown-toggle {
    display: block;
    padding: 12px 0;

    &:hover {
      color: #fff;
    }
  }

  .dropdown-menu {
    position: absolute;
    top: 42px;
    left: 0;
    display: none;
    width: 100px;
    background-color: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .2);
  }

  .menu-item {
    display: block;
    padding: 8px 12px;

    &:hover {
      color: @base-color;
    }
  }
}
@import 'form.less';